package com.liusaidh.service;

import com.liusaidh.domain.Report;
import com.liusaidh.dto.UpdateFormDTO;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;

/**
 * @author liusaidh
 * @date 2024/6/10 11:29
 * @description
 */
public interface MyService {

    /**
     * 修改密码
     * @param session
     * @param oldPwd
     * @param newPwd
     * @param confirmPwd
     * @return
     */
    ModelAndView updateMyPassword(HttpSession session, String oldPwd, String newPwd,String confirmPwd);

    /**
     * 回显信息
     * @param session
     * @return
     */
    ModelAndView echoMyMessage(HttpSession session);

    /**
     * 修改用户信息
     * @param session
     * @param userDTO
     * @param file
     * @return
     */
    ModelAndView updateMyInfo(HttpSession session, UpdateFormDTO userDTO, MultipartFile file) throws IOException;


    /**
     * 获取其他用户举报的信息
     * @param id 用户的id
     * @return 返回list
     */
    ModelAndView getReportForUser(Integer id, Integer pageNo, Integer pageSize);

    /**
     * ajax获取举报的信息
     * @param id
     * @param pageNo
     * @param pageSize
     * @return
     */
    List<Report> getReportListForUser(Integer id, Integer pageNo, Integer pageSize);
}
